import Vue from 'vue'
import App from './App.vue'

//引入ElementUI
import ElemetUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';

//引入VueRouter
import VueRouter from 'vue-router';

//引入路由器
import router from './router'


Vue.use(ElemetUI)
Vue.use(VueRouter)

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  router,
  beforeCreate(){
    //启动全局事件总线$bus, $bus在Vue的原型对象上使得所有的vc都能访问到
    Vue.prototype.$bus = this
  }
}).$mount('#app')
